import { request } from '../utils/request'
import { swipe, menu, goods } from '../type/home'

//获取轮播图数据
export const getSwipe = () => {
  return request<swipe[]>({
    url: 'banner/list'
  })
}
//首页菜单数据
export const getMenu = () => {
  return request<menu[]>({
    url: 'menu/list'
  })
}
//商品列表数据
export const getGoodsList = (data: { count: number; limitNum: number }) => {
  return request<goods[]>({
    url: 'pro/list',
    data
  })
}
//商品详情
export const getDetail = (proid: string) => {
  return request<goods>({
    url: `pro/detail/${proid}`
  })
}
